#include <stdio.h>
#include <string.h>
int main()
{
    //char s[] = "192.168.10.165";
    //char *s;
    char s[128] = {0};
    //scanf("%s", s);
    gets(s);
    char*start = s;// 指向字符串起点位置

    while(1)
    {
        char*p = strstr(start, ".");
        if(p == NULL)
        {
            printf("%s\n", start);
            break;
        }    
        *p = '\0';
        printf("%s\n", start);
        start = p+1;
    }
   
   

}